package com.example.backend.entitly.mysql.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单表
 *
 * @TableName orders
 */
@TableName(value = "orders")
@Data
public class Orders implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 订单ID
     */
    @TableId(type = IdType.AUTO)
    private Integer orderId;
    /**
     * 订单编号
     */
    private String orderNo;
    /**
     * 用户ID
     */
    private Integer userId;
    /**
     * 订单总金额
     */
    private BigDecimal totalAmount;
    /**
     * 支付金额
     */
    private BigDecimal paymentAmount;
    /**
     * 运费
     */
    private BigDecimal shippingFee;
    /**
     * 优惠金额
     */
    private BigDecimal discountAmount;
    /**
     * 优惠券金额
     */
    private BigDecimal couponAmount;
    /**
     * 1-支付宝 2-微信 3-银行卡
     */
    private Integer paymentType;
    /**
     * 支付时间
     */
    private Date paymentTime;
    /**
     * 0-未支付 1-已支付
     */
    private Integer paymentStatus;
    /**
     * 0-未发货 1-已发货 2-已收货
     */
    private Integer shippingStatus;
    /**
     * 0-待付款 1-待发货 2-待收货 3-已完成 4-已取消
     */
    private Integer orderStatus;
    /**
     * 收货人姓名
     */
    private String receiverName;
    /**
     * 收货人电话
     */
    private String receiverPhone;
    /**
     * 收货人地址
     */
    private String receiverAddress;
    /**
     * 订单备注
     */
    private String note;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 更新时间
     */
    private Date updatedAt;
    /**
     * 0-正常 1-删除
     */
    private Integer deleted;
    /**
     * 删除时间
     */
    private Date deletedAt;
}